<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>


    <div id="app">
        <!-- 列表 -->
        <ul>
            <li v-for="(item, index) in list" :key="item.id">
                <span>{{item.id + item.name + item.time}}</span>
            </li>
        </ul>
    </div>
    <script src="http://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"> </script>
    <script>
        const app = new Vue({
            el: "#app",
            data: {
                list: [
                    { id: 1, name: "奔驰", time: "2020-08-01" },
                    { id: 2, name: "宝马", time: "2020-08-02" },
                    { id: 3, name: "奥迪", time: "2020-08-03" },
                ],
            },
            methods: {
                // 删除函数传入的唯一id
                delTr(id) {
                    this.list = this.list.filter(item => item.id !== id)
                }
            }
        });
    </script>
</body>

</html>